package com.sf.android.binding

import android.os.Bundle
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import androidx.core.provider.DocumentsContractCompat.DocumentCompat
import androidx.documentfile.provider.DocumentFile
import com.sf.android.binding.databinding.ActivityMainBinding

class MainActivity : AppCompatActivity(), IVewBinding<ActivityMainBinding> {

    private val launcher = registerForActivityResult(ActivityResultContracts.OpenDocumentTree()) {
        if (it != null) {

            val documentFile = DocumentFile.fromTreeUri(this, it)

        }
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)

        DocumentCompat.FLAG_VIRTUAL_DOCUMENT

    }
}